<template>
  <div  class="container">
    <!--工具栏-->
    <div v-if="orderDetailDialog">
      <el-form :inline="true" :model="filters" :size="size" ref="filters" label-width="120px">
         <el-form-item label="商户名称" prop="merchantName">
                <el-input v-model="filters.merchantName"></el-input>
            </el-form-item>
            <el-form-item label="商户code" prop="merchantCode" label-width="120px">
                <el-input v-model="filters.merchantCode" ></el-input>
            </el-form-item>
            <el-form-item label="订单编号" prop="orderNo">
                <el-input v-model="filters.orderNo"></el-input>
            </el-form-item>
            <el-form-item label="第三方订单时间" prop="buyTime">
                <el-input v-model="filters.buyTime" placeholder="订单编号" clearable></el-input>
               <!--   <el-form-item prop="date">
                    <el-date-picker type="date" v-model="filters.buyTime" placeholder="下单时间" style="width: 180px;"></el-date-picker>
                </el-form-item> -->
            </el-form-item>
         
            <el-form-item label="订单类型" prop="orderTypeb">
                <el-select v-model="filters.orderTypeb" placeholder="全部" style="width:160px" clearable>
                    <el-option label="积分订单" value="1"></el-option>
                    <el-option label="普通订单" value="2"></el-option>                
                </el-select>
            </el-form-item>
            <el-form-item label="来源渠道" prop="sources">
                <el-select v-model="filters.sources" placeholder="全部" style="width:160px" clearable>
                    <el-option label="APP" value="1"></el-option>
                    <el-option label="商城小程序" value="2"></el-option> 
                    <el-option label="企业微信" value="3"></el-option>     
                    <el-option label="We2000公众号" value="4"></el-option>
                    <el-option label="商城公众号" value="5"></el-option>   
                      <el-option label="其他" value="6"></el-option>                 
                </el-select>
            </el-form-item>
             <el-form-item label="活动来源" prop="orderSources">
                <el-select v-model="filters.orderSources" placeholder="全部" style="width:160px" clearable>
                    <el-option label="拼团" value="1"></el-option>
                    <el-option label="秒杀" value="2"></el-option> 
                    <el-option label="预售" value="3"></el-option>     
                    <el-option label="抽奖" value="4"></el-option>                           
                </el-select>
            </el-form-item>
            <el-form-item label="收货人" prop="buyerRealname" label-width="120px">
                <el-input v-model="filters.buyerRealname" ></el-input>
            </el-form-item>
            <el-form-item label="收货人手机号" prop="consigneePhone" label-width="120px">
                <el-input v-model="filters.consigneePhone" ></el-input>
            </el-form-item>
            <el-form-item label="收货人地址" prop="" label-width="100px">
                <v-distpicker
                  :province="filters.addressProvinceName"
                  @province="changeProvince"
                  :city="filters.addressCityName"
                  @city="changeCity"
                  :area="filters.addressAreaName"
                  @area="changeArea">

                </v-distpicker>
            </el-form-item>
            <el-form-item label="商品名称" prop="goodsName" label-width="120px">
                <el-input v-model="filters.goodsName" ></el-input>
            </el-form-item>
            <el-form-item label="商品编码" prop="commodityCode" label-width="120px">
                <el-input v-model="filters.commodityCode" ></el-input>
            </el-form-item>
            <el-form-item prop="buyerId" label="会员手机号" label-width="120px">
                <el-input v-model="filters.tel" ></el-input>
            </el-form-item>
             <el-form-item prop="waybillNumber" label="运单编号" label-width="120px">
                <el-input v-model="filters.waybillNumber" ></el-input>
            </el-form-item>
            <el-form-item label="发货日期" prop="deliveryDate" label-width="120px">              
                 <el-form-item prop="date">
                    <el-date-picker type="date" v-model="filters.deliveryDate" placeholder="发货时间" style="width: 180px;"></el-date-picker>
                </el-form-item>
            </el-form-item>
            <el-form-item label="支付方式" prop="payment" label-width="120px">
                <el-select v-model="filters.payment" placeholder="全部" style="width:160px" clearable>
                    <el-option label="微信分期" value="1"></el-option>
                    <el-option label="We2000" value="2"></el-option> 
                    <el-option label="微信支付" value="3"></el-option>     
                    <el-option label="微信银行储蓄卡" value="4"></el-option>                           
                </el-select>
            </el-form-item>
             <el-form-item label="是否需要开发票" prop="whetherInvoice" label-width="120px">
                <el-select v-model="filters.whetherInvoice" placeholder="全部" style="width:160px" clearable>
                    <el-option label="是" value="1"></el-option>
                    <el-option label="否" value="2"></el-option>                                          
                </el-select>
            </el-form-item>
            <el-form-item label="结算状态" prop="balanceSts" label-width="120px">
                <el-select v-model="filters.balanceSts" placeholder="全部" style="width:160px" clearable>
                    <el-option label="未结算" value="1"></el-option>
                    <el-option label="已清算" value="2"></el-option> 
                    <el-option label="轧差中" value="3"></el-option>     
                    <el-option label="已轧差" value="4"></el-option>                           
                </el-select>
            </el-form-item>
             <el-form-item label="订单标签" prop="orderTag">
                <el-select v-model="filters.orderTag" style="width:160px" placeholder="全部" clearable>
                    <el-option v-for="item in orderTagData" :key="item.code" :label="item.message" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
            
            <el-form-item label="购买方式" prop="buyerRealname" label-width="120px">
                 <el-select v-model="filters.orderTag" style="width:160px" placeholder="全部" clearable>
                    <el-option label="邮寄" value="0"></el-option>
                    <el-option label="线下自提" value="1"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="下单时间">
                <el-form-item prop="date">
                    <el-date-picker type="date" v-model="filters.buyTimeStart" placeholder="下单日期开始时间" style="width: 180px;"></el-date-picker>
                </el-form-item>
                <span class="dater">-</span>
                <el-form-item prop="date" style="width: 180px;">
                    <el-date-picker type="date" v-model="filters.buyTimeEnd" placeholder="下单日期开始时间"></el-date-picker>
                </el-form-item>
            </el-form-item>

            <!--底部按钮栏-->
            <el-col :span="16" :offset="10">
                <el-form-item>
                    <el-button type="primary" @click="findPage()">查询</el-button>
                    <el-button type="primary" @click="resetForm()">重置</el-button>
                </el-form-item>
            </el-col>
      </el-form>

      <el-table :data="pageResult" :size="size" align="align" style="width: 100%" :min-height="350" :stripe="true" :header-cell-style="{ 'color': '#FFF','background-color': '#2F4554'}">
       <el-table-column label="商户名称" min-width="120" sortable>
          <template slot-scope="scope">
          </template>
        </el-table-column>
        <el-table-column label="包裹编号" min-width="120" sortable>
          <template slot-scope="scope">
           {{scope.row.baleNo}}
          </template>
        </el-table-column>
        <el-table-column label="包裹状态" prop="orderStatus" min-width="120" sortable>
          <template slot-scope="scope">
            <span v-if="scope.row.orderStatus==1">待调度</span>
            <span v-if="scope.row.orderStatus==2">已送达</span>
            <span v-if="scope.row.orderStatus==3">已关闭</span>
          </template>
        </el-table-column>
        <el-table-column label="配送商" prop="distributorName" min-width="120" sortable></el-table-column>
        <el-table-column label="发货日期" prop="distributorName" min-width="120" sortable></el-table-column>
        <el-table-column label="运单号" prop="expressNo" min-width="120" sortable></el-table-column>
        <el-table-column label="订单编号" prop="orderNo" min-width="120" sortable></el-table-column>
        <el-table-column label="下单日期" prop="orderDate" min-width="120" sortable></el-table-column>
        <el-table-column label="订单类型" prop="orderType" min-width="120" sortable></el-table-column>
        <el-table-column label="来源渠道" prop="sourceChannel" min-width="120" sortable></el-table-column>
        <el-table-column label="订单来源" prop="orderSource" min-width="120" sortable></el-table-column>
        <el-table-column label="商品类型" prop="commodityType" min-width="120" sortable></el-table-column>
        <el-table-column label="订单状态" prop="orderStatus" min-width="120" sortable></el-table-column>
        <el-table-column label="发货状态" prop="shipmentStatus" min-width="120" sortable></el-table-column>
        <!-- <el-table-column label="交货单号" prop="deliverNo" min-width="120" sortable></el-table-column>
        <el-table-column label="交货单状态" prop="deliverStatus" min-width="150" sortable></el-table-column>
         -->
        <!-- <el-table-column label="销售商家" prop="merchantName" min-width="120" sortable></el-table-column>
        <el-table-column label="销售店铺名称" prop="storeName" min-width="150" sortable></el-table-column> -->
        <!-- <el-table-column label="发货仓库" prop="warehouseName" min-width="150" sortable></el-table-column> -->
        <el-table-column label="收货人姓名" prop="receiverName" min-width="150" sortable></el-table-column>
        <el-table-column label="收货人手机" prop="receiverPhone" min-width="150" sortable></el-table-column>
        <el-table-column label="收货人地址" min-width="150" sortable>
          <template slot-scope="scope">
            {{scope.row.receiverProvinceName}}
            {{scope.row.receiverCityName}}
            {{scope.row.receiverRegionName}}
            {{scope.row.receiverAddress}}
          </template>
        </el-table-column>
        <el-table-column label="操作" min-width="180" sortable fixed="right">
          <template slot-scope="scope">
          <!--   <kt-button :label="$t('action.confirmReceipt')"  :size="size" type="primary" v-if="scope.row.orderStatus == 1" @click="handleReceipt(scope.row)"/> -->
         <!--  <a href="#" @click="goOrderDetail(scope.row)"> -->
            <kt-button label="查看"  :size="size" type="primary"   @click="goOrderDetail(scope.row)"/>
          </template>
        </el-table-column>
      </el-table>

      <!--分页栏-->
      <el-pagination layout="total, prev, pager, next, jumper,sizes"
                     @current-change="refreshPageRequest"
                     @size-change="handleSizeChange"
                     :current-page="pageRequest.pageNum"
                     :page-size="pageRequest.pageSize"
                     :total="totalSize"
                     style="float:right;"
                     :page-sizes="[10, 20, 30, 40]"></el-pagination>
    </div>

    <!-- 订单详情 -->
    <div v-if="orderDetailDialog1" class="orderDetail">
      <el-button icon="el-icon-arrow-left" style="margin-bottom: 20px;" @click="handleCancle" circle></el-button>

      <el-card class="box-card">
         <div style="width:30%;text-align:left;float:left">
            <div style="margin:10px 0px 40px 10px">
              <span>订单编号：</span>
              <span>{{orderDetailList.baleNo}}</span>
            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>来源终端</span>
              <span>H5</span>
            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>下单时间：</span>
              <span>{{dataForm.buyTime}}</span>
            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>支付状态：</span>
              <span v-if="dataForm.orderStatus==1">待支付</span>
              <span v-if="dataForm.orderStatus==2">已支付</span>
              <span v-if="dataForm.orderStatus==3">待发货</span>
              <span v-if="dataForm.orderStatus==4">已发货</span>
              <span v-if="dataForm.orderStatus==5">确认收货</span>
              <span v-if="dataForm.orderStatus==6">待评价</span>
              <span v-if="dataForm.orderStatus==7">已关闭</span>
              <span v-if="dataForm.orderStatus==8">付款处理中</span>
              <span v-if="dataForm.orderStatus==9">已退款</span>
              <span v-if="dataForm.orderStatus==10">已完成</span>
            </div>
            <div style="margin:0px 0px 0px 10px">
              <span>手机：</span>
              <span>{{orderBaleDelivery.receiverPhone}}</span>
            </div>
          </div>
          <!--2/4栏-->
          <div style="width:20%;text-align:left;float:left">
            <div style="margin:10px 0px 40px 10px">
              <span>订单类型：</span>
              <span v-if="dataForm.orderTypeB==0">全部</span>
              <span v-if="dataForm.orderTypeB==0">积分订单</span>
              <span v-if="dataForm.orderTypeB==0">普通订单</span>
            </div>
            <div style="margin:0px 0px 40px  10px">
              <span>来源渠道：</span>
              <span v-if="dataForm.sources==0">全部</span>
              <span v-if="dataForm.sources==1">APP</span>
              <span v-if="dataForm.sources==2">商城小程序</span>
              <span v-if="dataForm.sources==3">企业微信</span>
              <span v-if="dataForm.sources==4">We2000公众号</span>
              <span v-if="dataForm.sources==5">商城公众号</span>
              <span v-if="dataForm.sources==6">其他</span>
            </div>
            <div style="margin:0px 0px 40px  10px">
              <span>会员手机号：</span>
              <span>{{dataForm.consigneePhone}}</span>
            </div>
            <div style="margin:0px 0px 40px  10px">
              <span>支付方式：</span>
              <span v-if="dataForm.payment==0">全部</span>
              <span v-if="dataForm.payment==1">微信分期</span>
              <span v-if="dataForm.payment==2">We2000</span>
              <span v-if="dataForm.payment==3">微信支付</span>
              <span v-if="dataForm.payment==4">微信银行储蓄卡</span>

            </div>
            <div style="margin:0px 0px 10px  10px">
              <span>收货人姓名：</span>
              <span>银子</span>
            </div>
          </div>
          <!--3/4栏-->
          <div style="width:30%;text-align:left;float:left">
            <div style="margin:10px 0px 40px 10px">
              <span>订单状态：</span>
              <span v-if="dataForm.orderStatus==1">待支付</span>
              <span v-if="dataForm.orderStatus==2">已支付</span>
              <span v-if="dataForm.orderStatus==3">待发货</span>
              <span v-if="dataForm.orderStatus==4">已发货</span>
              <span v-if="dataForm.orderStatus==5">确认收货</span>
              <span v-if="dataForm.orderStatus==6">待评价</span>
              <span v-if="dataForm.orderStatus==7">已关闭</span>
              <span v-if="dataForm.orderStatus==8">付款处理中</span>
              <span v-if="dataForm.orderStatus==9">已退款</span>
              <span v-if="dataForm.orderStatus==10">已完成</span>

            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>订单来源：</span>
              <span v-if="dataForm.orderSources==0">全部</span>
              <span v-if="dataForm.orderSources==1">拼团</span>
              <span v-if="dataForm.orderSources==2">秒杀</span>
              <span v-if="dataForm.orderSources==3">预售</span>
              <span v-if="dataForm.orderSources==4">抽奖</span>
            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>外部订单编号：</span>
              <span>{{dataForm.externalOrderCode}}</span>
            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>订单标签：</span>
              <span v-if="dataForm.orderTag==0">VIP</span>
              <span v-if="dataForm.orderTag==1">紧急</span>
              <span v-if="dataForm.orderTag==2">特别</span>
              <span v-if="dataForm.orderTag==3">关注</span>
              <span v-if="dataForm.orderTag==4">搁置</span>
            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>收货人地址：</span>
              <span>{{orderBaleDelivery.receiverAddress}}</span>
            </div>

          </div>
          <!--4/4栏-->
          <div style="width:20%;text-align:left;float:left">
            <div style="margin:10px 0px 40px 10px">
              <span>销售商户：</span>
              <span>{{dataForm.salesBusiness}}</span>
            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>商品类型：</span>
              <span>没有字段</span>
            </div>
            <div style="margin:0px 0px 40px 10px">
              <span>订单异常状态：</span>
              <span>没有字段</span>
            </div>
          </div>
      </el-card>


        <div style="text-align:left">
          <template>
          <el-table :data="productDetailsData" style="width: 100%" border stripe>
          <el-table-column prop="orderNo" label="订单行号" width="180"></el-table-column>
          <el-table-column prop="goodsName" label="商品名称" width="180"></el-table-column>
          <el-table-column prop="productCode" label="商品编码"></el-table-column>
          <el-table-column prop="propertyName" label="规格属性"></el-table-column>
          <el-table-column prop="artNo" label="货号"></el-table-column>
           <el-table-column prop="orderingUnit" label="订购单位">
          </el-table-column>
          <el-table-column prop="quantityOfThisShipment" label="发货数量">
          </el-table-column>
        </el-table>
          </template>
        </div>
 <div style="background-color:#f0f3f4;text-align:left;padding:10px 20px;font-weight:700;border-bottom:1px solid #ccc">
                    <span>进度详情</span>
                </div>
                 <div style="text-align:left;height:400px;padding-top:30px" >
                     <el-row :gutter="20">
                        <el-col :span="6" style="padding-left: 100px;text-align: left;">
                           <p>包裹编号：{{orderBaleDelivery.baleNo}}</p><br>
                           <p>配送商：{{orderBaleDelivery.distributorName}}</p><br>
                           <p>运单号：{{orderBaleDelivery.expressNo}}</p><br>
                           <p>包裹状态：{{orderBaleDelivery.orderStatus}}</p><br>
                           <p>收货人：{{orderBaleDelivery.receiverName}}</p><br>
                           <p>收货人电话：{{orderBaleDelivery.receiverPhone}}</p><br>
                           <p>收货人地址：{{orderBaleDelivery.receiverAddress}}</p><br>
                        </el-col>
                        <el-col :span="14">
                           <p>顺丰速运 已收取快件</p><br>
                           <p>2016-04-27 21:00:00   快件离开【上海徐汇田林营业部】,正发往 【上海虹桥集散中心2】</p><br>
                           <p>2016-04-27 21:52:00   快件离开【上海虹桥集散中心2】,正发往下一站</p><br>
                           <p>2016-04-28 01:40:00   快件离开【苏州昆山集散中心】,正发往下一站</p><br>
                           <p>2016-04-28 04:56:00   快件离开【苏州吴中集散中心】,正发往 【苏州工业园苏利达服饰营业点】</p><br>
                           <p>2016-04-28 09:32:00   快件到达顺丰合作点【苏州大学独墅湖校区一期炳麟图书馆咖啡吧】,请携带有效证件前往自取</p><br>
                           <p>2016-04-28 15:00:00   正在派送途中,请您准备签收(派件人:范猛,电话:18962141940)</p><br>
                           <p>2016-04-28 19:05:00   已签收,感谢使用顺丰,期待再次为您服务</p><br>
                        </el-col>
                    </el-row>
                 </div>

    </div>
  </div>
</template>

<script>
  import CyTable from "@/views/Core/ProductTable";
  import KtButton from "@/views/Core/KtButton";
  import citys from '../../../../static/json/Paje/citys';
  import VDistpicker from "v-distpicker";

  export default {
    components: {CyTable, KtButton,VDistpicker},
    data() {
      return {
        size: "small",
        orderDetailDialog: true,
        orderDetailDialog1: false,
        orderDetailList: {
          baleNo: '',
          createTime: '',
          creator: '',
          creatorName: '',
          deliverNo: '',
          deliverStatus: '',
          deliveryType: '',
          deptId: '',
          distributorName: '',
          expressNo: '',
          id: '',
          mark: '',
          merchantId: '',
          merchantName: '',
          orderNo: '',
          orderStatus: '',
          receiverAddress: '',
          receiverCityId: '',
          receiverCityName: '',
          receiverCountryId: '',
          receiverName: '',
          receiverPhone: '',
          receiverProvinceId: '',
          receiverProvinceName: '',
          receiverRegionName: '',
          storeId: '',
          storeName: '',
          updateTime: '',
          updator: '',
          updatorName: '',
          version: '',
          warehouseId: '',
          warehouseName: ''
        },
        options: citys,
        warehouseList: [],
        receiverAddress: [],
        filters: {},
        pageResult: [],
        totalSize: 0,
        pageRequest: {pageNum: 1, pageSize: 10},
        baleDetailFilters: {
          baleNo: '',
          orderNo: '',
        },
        productPageResult: [],
        orderTagData: [], // 订单标签
        tabMapOptions: [], // tab订单状态
        dataForm:[],
        productTotalSize: 0,
       productDetailsData: [],
        productFilterColumns: [
          {prop: "orderNo", label: "订单编号", minWidth: 120},
          {prop: "storeName", label: "销售店铺名称", minWidth: 120},
          {prop: "createTime", label: "订单创建时间", minWidth: 120},
          {prop: "receiverName", label: "收货人姓名", minWidth: 120},
          {prop: "deliverNo", label: "交货单号", minWidth: 120},
        ],
        productPageRequest: {pageNum: 1, pageSize: 10},
        orderBaleDelivery: [] // 物流详情
      }
    },
    mounted() {
        this.queryWarehouseList();
        this.findPage();
        this.init();
        this.getOrders()
    },
    methods: {
      // 获取分页数据
      findPage: function () {
	      let this_ = this
	      if (this_.filters == undefined || this_.filters == null) {
		      this_.filters = {}
	      }
	      this_.filters.start = this_.pageRequest.pageNum
	      this_.filters.limit = this_.pageRequest.pageSize
	      if (this.receiverAddress != null) {
		      this_.filters.receiverProvinceId = this.receiverAddress[0]
		      this_.filters.receiverCityId = this.receiverAddress[1]
		      this_.filters.receiverCountryId = this.receiverAddress[2]
	      }
	      this.utils.request.orderBaleQueryPage(this_.filters, function(res) {
		      if (res.data.rows.length == 0) {
			      this_.pageResult = []
			      this_.totalSize = 0
			      return
		      }
		      this_.pageResult = res.data.rows
		      this_.totalSize = Number(res.data.total)
	      })
      },
       // 初始化页面数据
        init() {
            // 订单标签
            let enumParam = {}
            enumParam.enumName = 'com.jic.order.enums.OrderTagEnum'
            this.utils.request.queryEnumList(enumParam, (res) => {
                if (res.code == '0000') {
                    this.orderTagData = res.data
                }
            })

            // 订单状态
            enumParam.enumName = 'com.jic.order.enums.OrderStatusEnum'
            this.utils.request.queryEnumList(enumParam, (res) => {
                if (res.code == '0000') {
                    this.tabMapOptions = res.data

                    // 移除付款处理中
                    this.tabMapOptions.splice(7, 1)
                    this.tabMapOptions.splice(9, 1)
                    this.tabMapOptions.unshift({
                        code: 0,
                        message: '全部'
                    })
                }
            })
            this.findPage()
        },
      changeProvince(data) {
            this.filters.addressProvinceId = data.code;
            this.filters.addressProvinceName = data.value;
        },
        changeCity(data) {
            this.filters.addressCityId = data.code;
            this.filters.addressCityName = data.value;
        },
        changeArea(data) {
            this.filters.addressAreaId = data.code;
            this.filters.addressAreaName = data.value;
        },
      // 每页数据刷新
      refreshPageRequest: function (pageNum) {
        this.pageRequest.pageNum = pageNum;
        this.findPage();
      },
      // 每页条数刷新
      handleSizeChange: function (pageSize) {
        this.pageRequest.pageSize = pageSize;
        this.findPage();
      },
      // 列表订单状态
      formatterOrderStatus(row, column, prop) {
        if (prop == 1) {
          return "待调度";
        } else if (prop == 2) {
          return "已送达";
        } else if (prop == 3) {
          return "已关闭";
        }
      },
      // 确认签收
      handleReceipt(data) {
        let this_ = this;
        this.utils.request.orderBaleUpdate(data, function (res) {
          if (res.code == "0000") {
            this_.findPage();
            this_.$message({type: 'success', message: '操作成功'});
          }
        });
      },
      // 重置
      resetForm() {
        this.filters = {};
        this.receiverAddress = [];
        this.findPage();
      },
      // 查询仓库列表
      queryWarehouseList() {
        let this_ = this;
        this.utils.request.warehouseManagementQuery(null, function (res) {
          if (res.code == "0000") {
            this_.warehouseList = res.data;
          }
        });
      },
      // 商品分页数据
      findBaleDetailPage(params) {
        let this_ = this;
        if (params == undefined || params == null) {
          params = {
            pageNum: this_.productPageRequest.pageNum,
            pageSize: this_.productPageRequest.pageSize
          };
        }
        if (this_.baleDetailFilters == undefined || this_.baleDetailFilters == null) {
          this_.baleDetailFilters = {};
        }
        this_.baleDetailFilters.start = params.pageNum;
        this_.baleDetailFilters.limit = params.pageSize;
        //查询包裹详情
        this.utils.request.orderBaleDetailQueryPage(this_.baleDetailFilters, function (res) {
          if (res.data.rows.length == 0) {
            this_.productPageResult = [];
            return;
          }
          this_.productPageResult = res.data.rows;
          this_.productTotalSize = Number(res.data.total);
        });
      },
      // 查看包裹详情
      goOrderDetail(data) {
        let this_ = this;
        this_.orderDetailDialog = false;
        this_.orderDetailDialog1 = true;
        this_.orderDetailList = data;
        // 商品信息根据baleNo查询
        this_.baleDetailFilters.baleNo = data.baleNo;
        // 物流信息
        this_.utils.request.getMOrderBale({baleNo : data.baleNo}, function (res) {
          if (res.code === '0000') {

            this_.orderBaleDelivery = res.data[0];
            this_.getOrders(data);
            this_.getMOrder(data);
          }
        });

        },
      // 查看商品详情
      getOrders(data) {

        let this_ = this;
        this_.baleDetailFilters.orderNo = data.orderNo;
        this_.utils.request.getMOrderGoods({orderNo : data.orderNo}, function (res) {
          if (res.code === '0000') {
            debugger
              this_.productDetailsData.push(res.data)
            console.log(this_.productDetailsData)
          }
        });
      },
      // 查看订单详情
      getMOrder(data) {
        let this_ = this;
        this_.dataForm = data;
        this_.baleDetailFilters.orderNo = data.orderNo;
        this_.utils.request.getMOrders({orderNo : data.orderNo}, function (res) {
          if (res.code === '0000') {
              this_.dataForm = res.data
          }
        });
      },
      // 包裹详情返回
      handleCancle() {
        this.orderDetailDialog = true;
        this.orderDetailDialog1 = false;
      },
    },
  }
</script>

<style scoped lang='scss'>
  .peisong {
    margin: 20px;
  }

  .clearfix {
    text-align: left;
  }

   /deep/ .box-card {
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
    height: auto;
  }

  .jiesuan {
    margin-left: 10px;
  }

  .el-tabs {
    margin-bottom: 20px;
  }

  .orderDetail {
    margin: 20px;
    font-size: 14px;
  }

  .el-row {
    margin-bottom: 0px;
  &
  :last-child {
    margin-bottom: 0;
  }
  }
  .el-col {
    border-radius: 4px;
    color: #58666e !important;
  }

  .bg-purple {
    text-align: left;
  }

  .grid-content {
    border-radius: 4px;
    min-height: 36px;
  }

  .row-bg {
    padding: 10px 0;
  }

  /* 搜索条件样式统一 */
.toolbar /deep/ .el-form-item {
    height: 32px;
    line-height: 32px;
    margin-bottom: 15px;
}

.toolbar /deep/ .el-input__inner {
    height: 32px;
    line-height: 32px;
}

.toolbar /deep/ .el-form-item__label {
    height: 32px;
    line-height: 32px;
}

.spec /deep/ .el-input__inner {
    padding-right: 0;
}

.el-input {
    width: 160px !important;
    height: 32px;
    line-height: 32px;
}

.el-date-editor {
    width: 160px !important;
}

.container {
    padding-top: 10px;
    width: 100%;
    height: 100%;
}
</style>
